<h1>
	<?php echo $cms['title']?>
</h1>
<?php echo date("Y/m/d h时",$cms['addtime'])?>
<img src="<?php echo $cms['thumb']?>" alt="">
<p>
	<?php echo $cms['content']?>
</p>

        <?php
 $id= (int)$_GET['id'];//5   6789
        $pre = Db::table('article')->where("id",'<',$id)->orderBy('id','DESC')->first();

        $next = Db::table('article')->where("id",'>',$id)->orderBy('id','ASC')->first();
        if($pre)
        {
          $preLink = "<li><a href='".U('Home/Index/article',array('id'=>$pre['id']))."'>".$pre['title']."</a></li>";   
        }
        else{
            $preLink="没有了";
        }

        if($next)
        {
          $nextLink = "<li><a href='".U('Home/Index/article',array('id'=>$next['id']))."'>".$next['title']."</a></li>";   
        }
        else{
            $nextLink="没有了";
        }
        echo $preLink.$nextLink;
        ?>